package com.woniuxy.kaer.service.feign;


import com.woniuxy.kaer.commons.util.Result;
import com.woniuxy.kaer.service.dto.OrderInfoDto;
import com.woniuxy.kaer.service.dto.ServiceBaseDto;
import com.woniuxy.kaer.service.feign.impl.ServiceFeignClientImpl;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-server",fallback = ServiceFeignClientImpl.class)
public interface ServiceFeignClient {
    @GetMapping("/service/serviceBase/getServiceBaseByServiceName")
    public Result<List<Integer>> getServiceBaseByServiceName(@RequestParam("serviceName") String serviceName)throws Exception;

    @GetMapping("/service/serviceOder/getServiceOrderById")
    public Result<OrderInfoDto> getServiceOrderById(String serviceOrderId)throws Exception;
    @GetMapping("/getServiceBaseByShopIdAndServiceName")
    public Result<List<ServiceBaseDto>> getServiceBaseByShopIdAndServiceName(@RequestParam("shopId") Integer shopId)throws Exception;
}
